package com.xiaoxi.decoratormode;

import com.xiaoxi.decoratormode.border.SideBorder;
import com.xiaoxi.decoratormode.border.SurroundBorder;
import com.xiaoxi.decoratormode.display.Display;
import com.xiaoxi.decoratormode.display.MultipleDisplay;
import com.xiaoxi.decoratormode.display.StringDisplay;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author xiaoxi
 * @ProjectName design_mode
 * @PackageName com.xiaoxi.decoratormode
 * @ClassName Main
 * @Description TODO
 * @Date 2023/3/14 16:44
 * @Version 1.0
 */
public class Main {
    public static void main(String[] args) {
        Display display = new StringDisplay("Hello,World!");
//        display.show();
        List<String> list = new ArrayList<>();
        list.add("hello");
        list.add("World");
        Display display2 = new MultipleDisplay(list);
//        display2.show();

        Display display3 = new SideBorder(display2, '*');
//        display3.show();

        Display display4 = new SurroundBorder(display3, '+');
        display4.show();

        new SurroundBorder(new SideBorder(new SurroundBorder(display, '/'), '+'), '&').show();
//        Display display4 = new SurroundBorder(new SideBorder(, '+'), '^');
//        display4.show();

    }
}
